<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-model</title>
</head>

<body>

  <div id="app">
    <!-- 双向数据绑定 -->
    <input type="text" v-model="msg">
    <p>{{msg}}</p>

    <p>
      <input type="radio" v-model="gender" value="male" /> 男
      <input type="radio" v-model="gender" value="female" /> 女
    </p>

    <p>
      <input type="checkbox" v-model="eat" value="猪肉" />
      <input type="checkbox" v-model="eat" value="牛肉" />
      <input type="checkbox" v-model="eat" value="羊肉" />
    </p>
  </div>
  <!-- 引入vue文件 -->
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        msg: '',
        gender: '',
        eat:[]
      },
      methods: {

      }
    })

  </script>
</body>

</html>